package com.lekang.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lekang.common.core.domain.entity.SysUser;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lekang.common.annotation.Excel;
import com.lekang.common.core.domain.BaseEntity;

/**
 * CheckOut Management Object check_out_management
 * 
 * @author ruoyi
 * @date 2025-10-13
 */
@Data
public class CheckOutManagement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 单据编号 */
    @Excel(name = "单据编号")
    private String checkOutNo;

    /** 老人外键编号 */
    private Long elderlyId;

    /** 入住管理外键 */
    private Long checkInManagementId;

    /** 床位外键编号 */
    private Long bedId;

    /** 退住日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退住日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkOutDate;

    /** 退住原因 */
    @Excel(name = "退住原因")
    private String checkOutReason;

    /** 创建人 */
    @Excel(name = "创建人")
    private Long creator;

    /** 逻辑删除 */
    @Excel(name = "逻辑删除")
    private Long isDeleted;

    /** 业务ID */
    @Excel(name = "业务ID")
    private String businessId;

    /** 额外字段1 */
    private String extraField1;

    /** 额外字段2 */
    private String extraField2;
    
    // Association fields - for complete information when querying
    /** Elderly name */
    private String elderlyName;
    /** Elderly ID card */
    private String elderlyIdCard;
    /** Elderly contact */
    private String elderlyContact;
    /** Contract name */
    private String contractName;
    /** Contract number */
    private String contractNo;
    /** Bed number */
    private String bedNumber;
    /** Fee start date */
    private String feeStartDate;
    /** Fee end date */
    private String feeEndDate;
    /** Care level */
    private String careLevel;
    /** Caregiver name */
    private String caregiverName;
    /** Creator name */
    private String creatorName;
    /** Termination submitter */
    private String terminationSubmitter;
    /** Termination date */
    private String terminationDate;
    /** Termination agreement */
    private String terminationAgreement;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setCheckOutNo(String checkOutNo) 
    {
        this.checkOutNo = checkOutNo;
    }

    public String getCheckOutNo() 
    {
        return checkOutNo;
    }

    public void setElderlyId(Long elderlyId) 
    {
        this.elderlyId = elderlyId;
    }

    public Long getElderlyId() 
    {
        return elderlyId;
    }

    public void setCheckInManagementId(Long checkInManagementId) 
    {
        this.checkInManagementId = checkInManagementId;
    }

    public Long getCheckInManagementId() 
    {
        return checkInManagementId;
    }

    public void setBedId(Long bedId) 
    {
        this.bedId = bedId;
    }

    public Long getBedId() 
    {
        return bedId;
    }

    public void setCheckOutDate(Date checkOutDate) 
    {
        this.checkOutDate = checkOutDate;
    }

    public Date getCheckOutDate() 
    {
        return checkOutDate;
    }

    public void setCheckOutReason(String checkOutReason) 
    {
        this.checkOutReason = checkOutReason;
    }

    public String getCheckOutReason() 
    {
        return checkOutReason;
    }

    public void setCreator(Long creator) 
    {
        this.creator = creator;
    }

    public Long getCreator() 
    {
        return creator;
    }

    public void setIsDeleted(Long isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Long getIsDeleted() 
    {
        return isDeleted;
    }

    public void setBusinessId(String businessId) 
    {
        this.businessId = businessId;
    }

    public String getBusinessId() 
    {
        return businessId;
    }

    public void setExtraField1(String extraField1) 
    {
        this.extraField1 = extraField1;
    }

    public String getExtraField1() 
    {
        return extraField1;
    }

    public void setExtraField2(String extraField2) 
    {
        this.extraField2 = extraField2;
    }

    public String getExtraField2() 
    {
        return extraField2;
    }

    // Termination record fields
    public void setTerminationSubmitter(String terminationSubmitter) 
    {
        this.terminationSubmitter = terminationSubmitter;
    }

    public String getTerminationSubmitter() 
    {
        return terminationSubmitter;
    }

    public void setTerminationDate(String terminationDate) 
    {
        this.terminationDate = terminationDate;
    }

    public String getTerminationDate() 
    {
        return terminationDate;
    }

    public void setTerminationAgreement(String terminationAgreement) 
    {
        this.terminationAgreement = terminationAgreement;
    }

    public String getTerminationAgreement() 
    {
        return terminationAgreement;
    }

    // Association query fields
    private SysUser sysUser;
    private Elderly elderly;

    private String name;
    private String idCard;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("checkOutNo", getCheckOutNo())
            .append("elderlyId", getElderlyId())
            .append("checkInManagementId", getCheckInManagementId())
            .append("bedId", getBedId())
            .append("checkOutDate", getCheckOutDate())
            .append("checkOutReason", getCheckOutReason())
            .append("remark", getRemark())
            .append("creator", getCreator())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .append("businessId", getBusinessId())
            .append("extraField1", getExtraField1())
            .append("extraField2", getExtraField2())
            .toString();
    }
}
